<html>
  <head/>
  <body>
    
    <h1>Notes:</h1>
    <ol>
      <li>
        [EJ pg. 269] "In a multicore world, the real cost of synchronization
        is not the CPU time spent obtaining locks; it is the lost
        opportunities for parallelism and the delay imposed by the need to
        ensure that every core has a consistent view of the memory".
      </li>
      <li>
       Synchronize a mutable class internally only if there's lot of benefit
       in doing it internally. If it's the same as external synchronization
       then simply document it for the client and let the client synchronize
       only in concurrent environment. See [EJ pg. 270] for more detail and
       example of StringBuffer (thread safe) and StringBuilder (not thread safe
       and more performant).
      </li>
    </ol>
    
    <h1>References:</h1>
    <ol>
      <li>[EJ] Effective Java, second edition, by Joshua Bloch</li>
    </ol>
    
  </body>
</html>